/**
 * Created by win7 on 2017/3/15.
 */
import Relay from "react-relay";

export default class ReplySaveMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation {saveReply }`;
    }

    getVariables() {
        return {
            argsInput: {
                suggestId: this.props.suggestId,
                detail:this.props.detail,
                label:this.props.label

            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on saveReplyPayload{
            saveReply {
                errorCode
                value
                totalResult
                id
                reply{
                    createDate
                    userName
                    phone
                }
              
            }
        }`;
    }


    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on saveReplyPayload{
            saveReply {
                        errorCode
                        value
                        totalResult
                        id
                        reply{
                            createDate
                            userName
                            phone
                        }
  
                    }
                }
            `]
        }];
    }

}